/**
* 子模块路由
* ml
*/

var router = function ($urlRouterProvider, $stateProvider) {

	$stateProvider
		//预存列表
		.state('app.depositList', {
			url: "/deposit/list.html",
			views: {
				'main@': {
					template: require('../996tpl/views/table.html'),
					controller: 'depositList',
				}
			},
			resolve: {
				tableconfig: function (tableservice) {
					return tableservice.tableconfig();
				},
			}
		})

		//创建预存
		.state('app.depositCreate', {
			url: "/deposit/create.html",
			views: {
				'main@': {
					template: require('../996tpl/views/form.html'),
					controller: 'depositCreate',
				}
			},
			resolve: {
				formconfig: function (formservice) {
					return formservice.formconfig();
				},
				model: function (depositservice) {
					return depositservice.model;
				}
			}
		})
};

module.exports = router;